<template>
  <el-tabs
		type="card"
		class="anwser-record"
		v-model="props.activeName">
		<el-tab-pane
			v-for="item in props.tableData"
			:key="item.id"
			:name="JSON.stringify(item.id)"
			:label="item.createDate + ' ' + item.createTime">
			<QuestionItem
			 v-for="question in JSON.parse(item.items)"
			 :key="question.id"
			 :question="question"/>
		</el-tab-pane>
	</el-tabs>
</template>

<script setup>
import QuestionItem from './answerItem'
const props = defineProps({
	tableData: {
		type: Array,
		default: () => []
	},
	activeName: {
		type: String,
		default: ''
	}
})
console.dir(props.tableData)
</script>

<style scoped lang="scss">
.anwser-record {
	height: 100%;
}
</style>